import request from '../utils/request'


// 接口文档
// https://apifox.com/apidoc/shared-205c93aa-6b50-4a1a-85be-b93dc5304443/

// 获取验证码
export const getCode = (data) => {
    return request.post('/get/code', data)
}

// 验证码注册
export const getVerificationCode = (data) => {
    return request.post('/user/authentication', data)
}

// 登录
export const login = (data) => {
    return request.post('/login', data)
}

// 权限管理列表
export const authAdmin = (params) => {
    return request.get('/auth/admin', {params})
}

// 菜单权限数据
export const getMenus = () => {
    return request.get('/user/getmenu')
}

// 菜单权限修改
export const setMenus = (data) => {
    return request.post('/user/setmenu', data)
}

// 
export const menuList = (params) => {
    return request.get('/menu/list', {params})
}

// 菜单权限下拉列表
export const menuSelectList = () => {
    return request.get('/menu/selectlist')
}

// 用户信息修改
export const updateAuth = (data) => {
    return request.post('/update/user', data)
}

// 菜单权限
export const menuPermissions = () => {
    return request.get('/menu/permissions')
}

// 首页报表信息
export const getHomePageData = () => {
    return request.get('/report')
}